home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / mouser.zip / MOUSDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1993-01-04  |  1KB  |  39 lines

  1. program mousedemo;
  2.  
  3.    uses
  4.       crt,
  5.       dos,
  6.       mouser;
  7.  
  8.    var
  9.       movement     : mousemove;
  10.       button_press : boolean;
  11.       done         : boolean;
  12.    begin
  13.       movement.xmouse := 0;
  14.       movement.ymouse := 0;
  15.       if mouseready then
  16.       begin
  17.          done := false;
  18.          writeln(output, numberbutton:10);
  19.          while (not(done)) do
  20.          begin
  21.             if (questionmouse) then
  22.             begin
  23.                if mousebuttonpressed then
  24.                begin
  25.                   writeln(output, leftbutton:10, centerbutton:10, rightbutton:10);
  26.                   if centerbutton or rightbutton then
  27.                      done := true;
  28.                end;
  29.                mousemoved(movement);
  30.                writeln(output, movement.xmouse:10, movement.ymouse:10);
  31.             end;
  32.          end;
  33.       end
  34.       else
  35.       begin
  36.          writeln(output, 'MOUSE not functioning properly');
  37.          writeln(output, 'Please check mouse and try again');
  38.       end;
  39.    end.